<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>{{title}}</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
</head>
<body style="padding-top:60px;">
<!--导航的内容-->
<nav class="navbar navbar-default navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">知识管理系统</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="/ask">提问</a></li>
                {{if user}}
                <li class="in dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"
                       role="button" aria-haspopup="true"
                       aria-expanded="false">{{user}}
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="/user">个人资料</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="/signout">退出</a></li>
                    </ul>
                </li>
                {{else}}
                <li class="out"><a href="/signin">登录</a></li>
                {{/if}}
                <li><a href="/register">注册</a></li>
            </ul>
        </div>
    </div>
</nav>
<!--正文内容-->
<div class="container">
    <form action="/answer" method="POST">
        <div class="form-group">
            <!--在answer页面接收一下当前要修改的文件名称-->
            <!--最后再提交给服务器-->
            <input type="hidden" name="question" value="{{question}}">
            <textarea name="content" placeholder="请详细写回答内容" class="form-control" rows="10" required></textarea>
            <input type="submit" style="margin-top:20px;" class="btn btn-default btn-success btn-block" value="提交回答">
        </div>
    </form>
</div>
<!--模态框-->
<div class="modal fade bs-example-modal-sm" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog  modal-sm" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">用户提示</h4>
            </div>
            <div class="modal-body"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script src="/js/jquery.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/jquery.cookie.js"></script>
<script src="/scripts/answer.js"></script>